﻿
//Author: 张亚涛
//createtime:2016-03-10 09:44:42
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model
{
    public class Partner
    {
        public Partner()
        { }
        public Partner(IDataReader reader)
        {
            _id = int.Parse(reader["ID"].ToString());
            if (reader["PartnerNo"] != DBNull.Value)
            {
                _partnerNo = reader["PartnerNo"].ToString();
            }
            if (reader["PartnerName"] != DBNull.Value)
            {
                _partnerName = reader["PartnerName"].ToString();
            }
            if (reader["Address"] != DBNull.Value)
            {
                _address = reader["Address"].ToString();
            }
            if (reader["LianXR"] != DBNull.Value)
            {
                _lianXR = reader["LianXR"].ToString();
            }
            if (reader["LianXDH"] != DBNull.Value)
            {
                _lianXDH = reader["LianXDH"].ToString();
            }
            if (reader["Num"] != DBNull.Value)
            {
                _num = int.Parse(reader["Num"].ToString());
            }
        }

        #region 数据库字段
        private int? _id;
        private string _partnerNo;
        private string _partnerName;
        private string _address;
        private string _lianXR;
        private string _lianXDH;
        private int? _num;
        #endregion

        #region 字段属性
        /// <summary>
        /// 主键
        /// </summary>
        public int? Id
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 推广码
        /// </summary>
        public string PartnerNo
        {
            set { _partnerNo = value; }
            get { return _partnerNo; }
        }
        /// <summary>
        /// 伙伴名称
        /// </summary>
        public string PartnerName
        {
            set { _partnerName = value; }
            get { return _partnerName; }
        }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address
        {
            set { _address = value; }
            get { return _address; }
        }
        /// <summary>
        /// 联系人
        /// </summary>
        public string LianXR
        {
            set { _lianXR = value; }
            get { return _lianXR; }
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public string LianXDH
        {
            set { _lianXDH = value; }
            get { return _lianXDH; }
        }
        /// <summary>
        /// 优惠券赠送数量
        /// </summary>
        public int? Num
        {
            set { _num = value; }
            get { return _num; }
        }
        #endregion
    }
}